package com.goods.business.service;

import com.goods.common.error.BusinessException;
import com.goods.common.model.business.ProductCategory;
import com.goods.common.vo.business.ProductCategoryTreeNodeVO;
import com.goods.common.vo.business.ProductCategoryVO;
import com.goods.common.vo.system.PageVO;

import java.util.List;
import java.util.Map;

/**
 * @Description: 产品类别
 * @Author: Mr.Cao
 * @DateTime: 2021/11/8 16:59
 * BMW F750GS
 **/
public interface CategoryService {
    /**
     * 获取产品类别
     * */
    PageVO<ProductCategoryTreeNodeVO> categoryTree(Map map);

    /**
     * 添加商品时显示父级分类的名称
     * */
    List getParentCategoryTree();

    /**
     *添加分类
     */
    void add(ProductCategoryVO productCategoryVO) throws BusinessException;

    /**
     * 删除分类
     * */
    void delete(long categoryId) throws BusinessException;

    /**
     * 编辑时显示分类信息
     * */
    ProductCategory edit(long categoryId);
    /**
     * 更新分类信息
     * */
    void update(long categoryId,ProductCategoryVO productCategory);
}
